﻿@using System.Web.UI.WebControls
@using Dogshow.Model
@using DevExpress.Web.Mvc.UI
@model IEnumerable<Pas>

@Html.DevExpress().GridView(s =>
{
    s.Name = "gvPsi";
    s.CallbackRouteValues = new {Controller = "Psi", Action = "PsiGridViewCallback"};
    s.Columns.Add(c => { 
                            c.FieldName = "RasaPsa.NazivRase";
                            c.Caption = "Rasa";
                            c.GroupIndex = 0;
                        });
    s.Columns.Add("BrojRodovnika", "Rodovnik").Width = Unit.Pixel(80);
    s.Columns.Add("ImePsa", "Ime");
    //s.SettingsBehavior.AllowGroup = true;
    //s.Settings.ShowGroupPanel = true;
    s.SettingsPager.PageSize = 25;
    s.Width = Unit.Pixel(300);
    s.SettingsBehavior.AllowFocusedRow = true;
    s.Settings.ShowFilterRow = true;
    s.KeyFieldName = "Id";
    s.Caption = "Psi";
    s.ClientSideEvents.FocusedRowChanged = "onPasChanged";
    s.SettingsBehavior.AllowClientEventsOnLoad = false;
}).Bind(Model).GetHtml()